<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  <script type="text/javascript">
    window.FBL = {};
    window.onload = function()
    {
        with(FBL)
        {
            var parentNode = document.getElementById("out");
            
            // --------------------------------------------------------------
            // DomPlate test goes here
            // --------------------------------------------------------------
            
            var cars = [
              {name: "Honda Pilot", price: " $36,820 - $49,920"},
              {name: "Chevrolet Aveo", price: "$13,270 - $15,770"},
              {name: "Toyota Corolla", price: " $14,835 - $23,480"}
            ];
            
            var template = domplate(
                {
                    tag:
                        FOR("item", "array",
                            DIV({_myprop: "$item", onclick: "$onClick"},
                                "$item.name"
                            )
                        ),

                    onClick: function(event)
                    {
                        var target = event.target || event.srcElement;
                        var car = target.myprop;
                        alert(car.price);
                    }
                });

            template.tag.replace({array: cars}, parentNode, template);
                            
            // --------------------------------------------------------------
        }    
    }    
  </script>
  <script src="../../content/firebug/domplate.js" type="text/javascript"></script>
  </head>
  <body>
  
  <h1 id="header">DomPlate Test</h1>
  <div id="comment"><i>This is just a test file</i><hr/></div>
  <div id="out"></div>

  </body>
</html>
